package com.zxsc.zxmusic.other;

import android.app.Application;
import cn.bmob.v3.Bmob;

import com.umeng.analytics.MobclickAgent;
import com.umeng.analytics.MobclickAgent.EScenarioType;
import com.umeng.analytics.MobclickAgent.UMAnalyticsConfig;
import com.zxsc.zxmusic.db.SongDb;
import com.zxsc.zxmusic.manager.SongManager;
import com.zxsc.zxmusic.model.LastSong;
import com.zxsc.zxmusic.utils.SharedUtils;


public class HideApplication extends Application {

    public static boolean showListAnim;

    @Override
    public void onCreate() {
        super.onCreate();
        Bmob.initialize(this, "0fc5d1e8df2ed18fd3e90fbc8facc9b1");
        MobclickAgent.startWithConfigure(new UMAnalyticsConfig(getApplicationContext(), "575e7086e0f55a2605003138", "custom", EScenarioType.E_UM_NORMAL, true));
        showListAnim = SharedUtils.getBoolean(this, Constants.KEY_SHOW_LIST_ANIM, true);

        LastSong lastSong = SongDb.getLastSong(this);
        if (lastSong != null) {
            SongManager.with(this).setCurrentSong(lastSong.getId());
        }
    }
}
